package com.triadsystems.cashweb.modelo.persistencia.entidades;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

import com.triadsystems.cashweb.modelo.persistencia.enums.TipoPagamentoEnum;

@Entity
@Table 
@SequenceGenerator(name="seq_pagamento", sequenceName="cw_seq_pagamento", initialValue = 1, allocationSize = 1)
public class Pagamento extends ValueObject {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column
	@GeneratedValue(generator = "seq_pagamento", strategy = GenerationType.SEQUENCE)
	@Getter @Setter
	private Long entityId;
	
	@Getter @Setter
	private BigDecimal valorPagamento;
	
	@Getter @Setter
	@Enumerated
	private TipoPagamentoEnum tipoPagamento;
	
	@Getter @Setter
	private Boolean isEstornado = false;
	
	@Getter @Setter
	@ManyToOne
	private TransacaoPagamento transacaoPagamento;
}
